package com.xingzhe.learning.service;

import com.xingzhe.base.model.PageResult;
import com.xingzhe.learning.model.dto.MyCourseTableParams;
import com.xingzhe.learning.model.dto.XcChooseCourseDto;
import com.xingzhe.learning.model.dto.XcCourseTablesDto;
import com.xingzhe.learning.model.po.XcCourseTables;

public interface MyCourseTablesService {
    /**
     * @description 添加选课
     * @param userId 用户id
     * @param courseId 课程id
     * @return com.xingzhe.learning.model.dto.XcChooseCourseDto
     * @author Mr.M
     * @date 2022/10/24 17:33
     */
     XcChooseCourseDto addChooseCourse(String userId, Long courseId);


    /**
     * @description 判断学习资格
     * @param userId
     * @param courseId
     * @return XcCourseTablesDto 学习资格状态 [{"code":"702001","desc":"正常学习"},{"code":"702002","desc":"没有选课或选课后没有支付"},{"code":"702003","desc":"已过期需要申请续期或重新支付"}]
     * @author Mr.M
     * @date 2022/10/3 7:37
     */
     XcCourseTablesDto getLearningStatus(String userId, Long courseId);


    /**
     * 保存mq发来的消息到选课
     * @param chooseCourseId
     * @return
     */
     boolean saveChooseCourseSuccess(String chooseCourseId);


    /**
     * @description 我的课程表
     * @param params
     * @return com.xingzhe.base.model.PageResult<com.xingzhe.learning.model.po.XcCourseTables>
     * @author Mr.M
     * @date 2022/10/27 9:24
     */
     PageResult<XcCourseTables> mycoursetables(MyCourseTableParams params);

}
